/*
 * @Author: your name
 * @Date: 2022-03-29 17:53:01
 * @LastEditTime: 2022-03-29 20:49:56
 * @LastEditors: OBKoro1
 * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 * @FilePath: \第四阶段\ERP\erp-management-system\src\router\customerRouter.js
 */
import { Suspense, lazy } from 'react';
import { Navigate } from 'react-router-dom';
//路由懒加载的封装
const lazyComponent = (path) => {
  const LazyComp = lazy(() => import(`./../${path}`))
  return <Suspense fallback={<div>Loading...</div>}>
    <LazyComp />
  </Suspense>
}
const customerRouter = [

  {
    path: '/customerManage',
    title: '客户管理',
    // element: <Navigate to="/contract/dayIncrease"/>,
    children: [
      {
        path: '/customerManage/customerList',
        title: '客户列表',
        element: lazyComponent('views/customerManage/customerList/CustomerList'),
      }, {
        path: '/customerManage/collideBill',
        title: '撞单查询',
        element: lazyComponent('views/customerManage/collideBill/CollideBill')
      },
      {
        path: '/customerManage/add',
        title: '新增客户',
        element: lazyComponent('views/customerManage/add/Add')
      },

    ]
  },
]
export default customerRouter